<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>金额提现</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
    <link type="text/css" rel="stylesheet" media="screen" href="__PUBLIC__/app/css/mrs.css{$JSDEBUG}"/>
    <link type="text/css" rel="stylesheet" media="screen" href="__PUBLIC__/app/css/media.css{$JSDEBUG}"/>
    <script type="text/javascript" src="__PUBLIC__/app/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
	  $(function(){
		  $(".number").click(function(){
			  $(".addnumber").slideToggle();
			  
			  });
		  $(".addnumber dd").click(function(){
			  $(this).children('span').after('<i></i>');
			  $(this).siblings().children('i').hide();
			  $(".number span").html($(this).html());
			  $("#cardHolder").html($(this).find('span').attr('data-cardholder'));
			  $("#card_Id_Mark").val($(this).find('span').attr('card_id_value'));
			  $(".addnumber").slideToggle('slow');
			 // alert($(this).html())
			  });
	    });				
	</script>
</head>
<body style="background:#f7f7f9;">
	<include file="Public/customHeader" title="提现" url="{:U('Beautician/count')}"/>
   <form action="{:U('Beautician/count_cash')}" method="post">
 	<section class="mrs_sec">
       <div class="count_cash">
         <h1>只能提交本人所属的银行帐号及当地银行卡号</h1>
         <ul>
           <li>姓&nbsp;&nbsp;名：<span id="cardHolder"><input type="text" name="cardholder" value="{$data[0]['cardHolder']}"  placeholder="美容师姓名"></span></li>
           <li>
              <div class="number">银行卡号：<span>{$data[0]['bank_name']} {$data[0]['card_type']}（{$data[0]['last_four_number']}）</span><label></label></div>
              <div class="addnumber">
                <foreach name='data' item='vo'>
                	<dd><span data-cardholder="{$vo.cardHolder}" card_id_value="{$vo.id}">{$vo.bank_name}{$vo.card_type}	({$vo.last_four_number})</span></dd>
                </foreach>               
                 <!-- <dd><span>广发行储蓄卡（5531）</span></dd> -->
                <dd><a href="{:U('Beautician/addCard')}"><span>添加新银行卡</span></a></dd>
              </div>
           </li>
           <li>提现额度：<input type="text" id="input" name="money" value="账户余额￥{$amount}" placeholder="账户余额￥{$amount}"></li>
           <li>备注说明：<input type="text" name="remark" placeholder="如美滴滴账户提现"></li>
         </ul>
       </div>
       <input type="hidden" id="card_Id_Mark" name="card_id" value="{$data[0]['id']}" />
       <input type="submit" value="提交" class="count_cash_btn"> <!--判断完以上信息全部输入后addClass('go_btn')-->
	</section>
	</form>
	<script type="text/javascript">
		var text = document.getElementById("input");
		var Balance = document.getElementById("input").value;	
		var Balance=Balance.match(/\d+/ig);	
		text.onblur = function(){
			this.value=this.value.replace(/\D/g,'');
		    if(text.value>Balance){
		    	 text.value=Balance;
		    	 if(text.value>=1000){
		    		 text.value=999;
		    	 }
		    }else{
		    	if(text.value<1000){
		    		text.value;
		    	}
		    }	
		}
	</script>
</body>
</html>